// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';

const pluginName = 'hello-plugin';

import command from './commands/index';

import * as sidebar from './sidebar';

// this method is called when your extension is activated
// your extension is activated the very first time the command is executed

// 激活事件
export function activate(context: vscode.ExtensionContext) {
	console.log(`恭喜，您的扩展“${pluginName}”已被激活！122`);

	//注册侧边栏面板的实现
	const side = new sidebar.EntryList();
	vscode.window.registerTreeDataProvider("helloPlugin-tools", side);

	// 指令列表
	let disposable = command(context);
	// 注册指令
	context.subscriptions.push(...disposable);

	
}

// this method is called when your extension is deactivated
export function deactivate() {
	console.log(`您的扩展“${pluginName}”已被释放！`);
}
